[REPORT] Building an AWS solutions architect agentic app with Amazon Bedrock #DEV331 #AWSreInvent
Overview
Navigating through complex cloud solutions can be a daunting task. In this session, see how generative AI can help solve this problem by building an AWS solutions architect agentic app. Using Amazon Bedrock, learn how to build an app that can query AWS documentation, deploy infrastructure, create diagrams, and more. The session ends with a live demo, where the generative AI app handles a variety of tasks, significantly reducing manual effort and error. Gain practical insights and the know-how to build generative AI agentic apps to alleviate similar pain points.
The speaker, Namrata Shah, is also a Youtuber and posts AWS tutorials and hands-on sessions. NamrataHShah | Youtube
"There's never been a better time to be a builder" because there are so many ways to rethink everything that has ever been built. Generative AI and large language models allow us to rebuild and reinvent what has been built before.
Agenda
- Builder tools
- Why agentic workflows
- Let's build a solutions architect agentic app
Builder tools
AWS Generative AI Stack
INFRASTRUCTURE TO BUILD AND TRAIN AI MODELS
The infrastructure tools available for building, training, and deploying AI models are:
-
Amazon SageMaker
- A fully managed service that enables users to build, train, and deploy machine learning models at scale.
-
AWS Trainium
- A custom chip designed to accelerate the training of machine learning models.
-
AWS Inferentia
- A chip designed to optimize the inference process.
MODELS AND TOOLS TO BUILD GENERATIVE AI APPS
Once the model type is chosen, it can be used in Amazon Bedrock, which provides a fully managed, serverless platform for deploying and building generative AI applications. Amazon Bedrock includes features like knowledge bases, guardrails, and agents, which can be utilized to build agent workflow applications.
- Amazon Bedrock
- A fully managed serverless service for easily building and deploying generative AI models.
APPLICATIONS TO BOOST PRODUCTIVITY
Amazon Q is one of the most well-known applications built on Amazon Bedrock. In this session, Amazon Q Developer and Amazon Q will be used to explain code, with a focus on how generative AI can assist in coding tasks. Additionally, Amazon Q Business is designed to provide business users with insights and automation capabilities, helping to streamline business processes and improve decision-making.
-
Amazon Q Business
- Provides various types of insights and automation for business users.
-
Amazon Q Developer
- A coding assistant that works with you.
Amazon Bedrock
This slide showcases a list of third-party models. For example, in the case of text summarization, you can see the Amazon Titan model, which supports this functionality.
If you're looking for a specific model, this slide can help you identify it.
Amazon Q Developer
- Reimagines the experience across the entire software development lifecycle(SDLC)
- Helps developers and IT professionals build and manage secure, scalable, and highly available applications
- Helps you write, debug, test, optimize, and upgrade your code faster
- Converses with you to explore new AWS capabilities, learn unfamiliar technologies, and architect solutions.
Amazon Q is built with security and privacy in mind from the start, making it easier for organiations to use generative AI safely
Q Developer is a coding assistant who works with the developer, essentially telling them what code to write.
Agentic workflows
An AI agent is an autonomous system that perceives, decides, and acts to achieve goals, adapting its behavior based on experiences and interactions.
The spectrum of agentic system
The concept of "agentic" represents a spectrum of agent like qualities, allowing for a nuanced view of AI systems beyond simple binary classification.
There are rule-based systems like "if-then" statements, traditional machine learning models, and intermediate approaches involving iterative questioning. A variety of methods are combined without strictly categorizing them as "agent" or "non-agent."
Four key design patterns of agentic workflows
- Reflection
- Self-examination and improvement
- Tool use
- Leveraging external functions for information and data processing
- Planning
- Devising and executing multi-step plans for complex goals
- Multi-agent collaboration
- Multiple AI agents working together for enhanced problem-solving
Why build agentic systems?
- Enhanced problem-solving
- Break down complex tasks, adapt strategies
- Increased autonomy
- Minimal supervision, handle diverse scenarios
- Improved efficiency
- Automate multi-step processes, reduce repetitive tasks
- Scalability
- Manage increasing complexity, extend capabilities modularly
AWS solutions architect agentic app
- Query AWS documentation
- Offer instant, context-aware responses to queries
- Deploy infrastructure
- Automate cloud setup and configuration
- Create diagrams
- Visualize complex architectures effortlessly
Live coding
The demonstration showcased how to leverage Amazon Bedrock, Amazon Q, and agentic workflows to integrate AI into daily workflows and accelerate development tasks. The demo can be viewed via the following link.
Agent Configuration
- Begin by creating an agent, which involves defining its description and selecting a foundational model (in this case, Claude 3).
- Integrate various tools with the agent, such as:
- Creating Lambda functions
- Explaining and generating AWS architecture diagrams
- Converting websites into text
Knowledge Bases
- Set up a knowledge base based on the AWS Well-Architected Framework.
- Leverage the knowledge base to provide accurate, context-aware insights.
Working with AWS Architecture Diagrams
- Analyze existing architecture diagrams and provide explanations (e.g., media streaming solutions).
- Enable the agent to generate new AWS architecture diagrams and automatically explain their contents.
Code Generation and Deployment
- Generate Python CDK scripts based on architecture diagrams.
- Expand the scripts to output deployable AWS infrastructure code.
- For instance, create a Lambda function for sentiment analysis and deploy it to AWS.
live coding with Amazon Q
- Generate and refine Python code for lambda functions.
- Modifying code with the assistance of Amazon Q
Conclusion
Integrating AI into business operations can significantly enhance productivity. By leveraging Amazon Bedrock and Amazon Q, the process of building agent-based workflows and streamlining repetitive tasks is made straightforward and efficient.
Recap
- Amazon Q helps build features
Amazon Q helps build features, and Amazon Bedrock offers the infrastructure for LLM applications. These tools enable AI integration into workflows.
Nobody has special information about how to best use AI at your company, or a playbook for how to integrate it into your organization.
Workshop
There are also workshops that can be run on your own account, so if you're interested, be sure to save the QR code.